<template>
  <el-container class="adminHomeContainer">
    <el-header>
      <div class="headerDiv">
        <img class="logo" src="../../assets/sise.png" alt="">
        <span class="headerSpan">高校社团管理系统</span>
      </div>
      <el-button type="info" @click="logout">退出</el-button>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          router
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-tickets"></i>
              <span>社团公告</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/addActivity">公告</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-tickets"></i>
              <span>学生管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/student">学生列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-tickets"></i>
              <span>活动管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/addActivity">活动申请</el-menu-item>
              <el-menu-item index="/managerHome/activityList">活动列表</el-menu-item>
              <el-menu-item index="/managerHome/topicArticle">参与人员</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-office-building"></i>
              <span>社团管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/addClub">社团申请</el-menu-item>
              <el-menu-item index="/managerHome/clubList">社团列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-chat-dot-square"></i>
              <span>成员管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-2">所有成员</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="6">
            <template slot="title">
              <i class="el-icon-cloudy"></i>
              <span>**管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/allCircle">所有社团</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="7">
            <template slot="title">
              <i class="el-icon-user"></i>
              <span>**管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/allUser">所有用户</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="8">
            <template slot="title">
              <i class="el-icon-user"></i>
              <span>**管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/managerHome/allNews">设置广告</el-menu-item>
              <el-submenu index="9">
                <template slot="title">
                  <i class="el-icon-user"></i>
                  <span>消息管理</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="/managerHome/systemMessage">系统消息</el-menu-item>
                  <el-menu-item index="/managerHome/allMessage">所有消息</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name: 'ManagerHome',
  methods: {
    logout() {
      window.sessionStorage.removeItem('Authorization')
      this.$router.push('/adminLogin')
    }
  }
}
</script>

<style Lang="less" scoped>

.adminHomeContainer {
  height: 100%;
}

.el-header {
  background-color: #f7fafc;
  display: flex;
  justify-content: space-between;
  padding-left: 0;
  align-items: center;
  color: #1a1919;
  font-size: 20px;

}

.headerDiv {
  display: flex;
  align-items: center;

}

.headerSpan {
  margin-left: 15px;
}

.el-aside {
  background-color: #e6eaee;
}

.logo {
  height: 56px;
  width: 219px;
}
</style>
